package com.orphan.marketBack.service.impl;

import com.orphan.marketBack.dao.PurchaseGoodsMapper;
import com.orphan.marketBack.po.PurchaseGood;
import com.orphan.marketBack.service.PurchaseGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PurchaseGoodsServiceImpl implements PurchaseGoodsService {
    @Autowired
    private PurchaseGoodsMapper purchaseGoodsMapper;

    @Override
    public boolean insert(PurchaseGood goods) {
        int i = purchaseGoodsMapper.insert(goods);
        boolean flag = false;
        if (i > 0){
            flag = true;
        }
        return flag;
    }

    @Override
    public PurchaseGood selectGoods(String purchaseId) {
        PurchaseGood purchaseGood = purchaseGoodsMapper.selectGoods(purchaseId);
        return purchaseGood;
    }
}
